<div id="header">
    <div class="wrapper">



        <div id='logo'z>
            <?php echo $this->Html->link('Accueil', array('controller' => 'home','action' => 'index')).'<br/>'; ?>
        </div>
        
        <div class="navSport nav">
            <div class="part">
                <ul>
                    <?php 
                   
                    
                    $listSports = $this->requestAction(array('controller' => 'sports','action' => 'getListSports'));
                    
                    foreach ($listSports as $k => $s){
                    ?>
                    <li> <?php echo $this->Html->link($s, array('controller' => 'Sports', 'action' => 'view', $k));?> <?php echo $this->Html->link('On', array('controller' => 'App', 'action' => 'changeCurrentSport', $k));?> </li>
                    <?php        
                    }
                    ?>
                </ul>
            </div>
        </div>


        <div class="navSearch nav">
            <div class="part">
                <?php
                echo $this->Form->create('', array('id' => 'formSearchAll', 'url' => array('controller' => 'UsersVideos', 'action' => 'search')));
                echo $this->Form->input("valSearch", array(
                    'value' => 'What\'s the fuck, man ?',
                    'label' => ''
                ));
                ?> </div><div class="button"> <?php
                echo $this->Form->end('Search').
                    $this->Html->link('Recherche affinée', array())
                
                ?></div>
            
        </div>


        <div class="navUser nav">
            <div class="part">

                <?php
                if ($isUserConnected){
                ?>
                <ul> 
                    <li> <?php echo $this->Html->link("Déconnexion", array('controller' => 'Users', 'action' => 'logout'));?> </li>
                    <li> <?php echo $this->Html->link("Accueil", array('controller' => 'Users', 'action' => 'index'));?> </li>
                </ul>
                <?php
                }
                else{
                ?>
                <ul> 
                    <li> <?php echo $this->Html->link("Inscription", array('controller' => 'Users', 'action' => 'inscription'));?> </li>
                    <li> <?php echo $this->Html->link("Login", array('controller' => 'Users', 'action' => 'login'));?> </li>
                </ul>
                <?php
                }
                ?>
            </div>
       
        
        </div>
        
    </div>
    
  
</div>